﻿using System;
using GameEngine.Model;
using GameEngine.View.Components;
using PureMVC.Interfaces;
using GameEngine.Model.Data;

namespace GameEngine.View
{
    public class IThingMediatorConstants<MyIdType>
    where MyIdType : IComparable<MyIdType>
    {
        public const String ITEMMOUSEUP = "ItemMediator_MouseUp";
        public const String ITEMMOUSEDOWN = "ItemMediator_MouseDown";

        public static string GetMediatorNameFromProxy(IWorldDataProxy<MyIdType> world)
        {
            return "ThingMediator_world_" + world.Id.Value;
        } 
    }
    public interface IThingMediator<MyIdType, MyBaseUIElementType> : IMediator
        where MyIdType : IComparable<MyIdType>
    {
        event Action<IThingDataProxy<MyIdType>> OnHeightChange;
        event Action<IThingDataProxy<MyIdType>> OnPositionChange;

        IThingView<MyIdType, MyBaseUIElementType> GetThingDataProxyView(IThingDataProxy<MyIdType> thing);

        void AddThing(IThingDataProxy<MyIdType> proxy, IThingView<MyIdType, MyBaseUIElementType> view);

        void RemoveThing(IThingVOId<MyIdType> thing);
    }
}
